package jaoso.framework.web.servlet;

import jaoso.framework.exception.BusinessException;

import jaoso.framework.service.SecurityService;
import jaoso.framework.service.ServiceLocator;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

/**
 * @author ��Ե�¿�
 */
public class StartSpring extends HttpServlet
{
    /** log */
    private static Log log = LogFactory.getLog(StartSpring.class);

    private static String rootPath;

    /**
     * start spring
     * 
     * @exception ServletException
     *                exception
     */
    public final void init() throws ServletException
    {
        log.info("********* initing application now *********************");

        try
        {
            ((SecurityService) ServiceLocator.getInstance().getService(
                    "securityService")).initSecurity();
        } catch (BusinessException e)
        {
            log.error("starting spring error: ", e);
        }

        log.info("********* initing application OK *********************");
    }
}